# conding = utf-8
from selenium.webdriver.common.by import By
# 菜单模块
left_menu_management_outbound = By.XPATH, "//li/div/span/span[text()='销售管理']"
left_menu_sales_outbound = By.XPATH, "//li/a[@target='销售出库']"
# 查询单据编号
find_order_id = By.XPATH,"//div/div/span/input[@placeholder='请输入单据编号']"
find_expected_id = By.XPATH, "//tbody[@class='ant-table-tbody']/tr[1]/td[4]"
# 查询商品信息
find_order_product_news = By.XPATH,"//div/div[2]/div/div[2]/div/span/input"
find_expected_product_news = By.XPATH, "//tbody[@class='ant-table-tbody']/tr[1]/td[5]"
# 查询单据日期
find_order_date = By.XPATH,"//div/div[3]/div/div[2]/div/span/span/span"
find_oder_date_year_one = By.XPATH,"//span[@class='ant-calendar-ym-select']/a[text()='2024年']"
find_oder_date_year_two = By.XPATH,"//td[@role='gridcell']/a[text()='2021']"
find_oder_date_mother_one = By.XPATH,"//span[@class='ant-calendar-ym-select']/a[text()='12月']"
find_oder_date_mother_two = By.XPATH,"//tbody[@class='ant-calendar-month-panel-tbody']/tr[3]/td[1]/a[text()='七月']"
find_oder_date_mother_three = By.XPATH,"//tbody[@class='ant-calendar-month-panel-tbody']/tr[4]/td[3]/a[text()='十二月']"
find_oder_date_start_one = By.XPATH,"//td[@title='2021年7月1日']/div"
find_oder_date_end_one = By.XPATH,"//td[@title='2021年7月24日']/div"
find_oder_date_start_two = By.XPATH,"//td[@title='2024年12月1日']/div"
find_oder_date_end_two = By.XPATH,"//td[@title='2024年12月24日']/div"
find_expected_date = By.XPATH, "//tbody[@class='ant-table-tbody']/tr[1]/td[6]"
# 展开按钮
find_unfold = By.CSS_SELECTOR, ".ant-tabs-no-animation+div>div>div>div>div>div>form>div>span>div>a"
# 客户查询
find_customer = By.CSS_SELECTOR, ".ant-tabs-no-animation+div>div>div>div>div>div>form>div>div:nth-child(5)>div>div>div"
find_expected_customer = By.XPATH, "//tbody[@class='ant-table-tbody']/tr[1]/td[3]"
# 仓库名称查询
find_warehouse = By.CSS_SELECTOR, ".ant-tabs-no-animation+div>div>div>div>div>div>form>div>div:nth-child(6)>div>div>div"
# 操作员查询
find_operator = By.CSS_SELECTOR, ".ant-tabs-no-animation+div>div>div>div>div>div>form>div>div:nth-child(7)>div>div>div"
# 关联订单查询
find_relevancy = By.CSS_SELECTOR, ".ant-tabs-no-animation+div>div>div>div>div>div>form>div>div:nth-child(8)>div>div>div>span>input"
# 结算账户查询
find_settlement_account = By.CSS_SELECTOR, ".ant-tabs-no-animation+div>div>div>div>div>div>form>div>div:nth-child(9)>div>div>div"
# 有无欠款查询
find_Whether_arrears = By.CSS_SELECTOR, ".ant-tabs-no-animation+div>div>div>div>div>div>form>div>div:nth-child(10)>div>div>div"
# 单据状态查询
find_state = By.CSS_SELECTOR, ".ant-tabs-no-animation+div>div>div>div>div>div>form>div>div:nth-child(11)>div>div>div"
# 单据备注查询
find_remark = By.CSS_SELECTOR, ".ant-tabs-no-animation+div>div>div>div>div>div>form>div>div:nth-child(12)>div>div>div>span>input"
# 查询暂无数据
find_no_data_yet = By.CSS_SELECTOR, ".ant-empty-description"
# 重置
find_bnt_order_reset = By.CSS_SELECTOR, ".table-page-search-submitButtons>div>button:nth-child(2)"
# 查询按钮
find_btn = By.CSS_SELECTOR, ".table-page-search-submitButtons>div>button:nth-child(1)"

# 新增按钮
insert_order = By.CSS_SELECTOR, ".table-operator>button:nth-child(1)"
# 下一步按钮
insert_order_next = By.CSS_SELECTOR, ".introjs-tooltipbuttons>a:nth-child(2)"
# 获取客户文本框
insert_order_customer = By.XPATH, "//div[@class='ant-modal-content']/div[2]/div/div/form/div/div[1]/div/div[2]/div/span/div/div"
# 获取客户为空文本
insert_order_customer_txt = By.XPATH, "//div[@class='ant-modal-content']/div[2]/div/div/form/div/div[1]/div/div[2]/div/div[@class='ant-form-explain']"
# 点击扫码输入
insert_order_barcodes_bnt = By.XPATH, "//div[@id='billModal']/div/div/div[3]/div[@data-title='扫码录入']/div/button"
# 获取扫码输入条码文本框
insert_order_barcodes = By.XPATH, "//div/div[@data-title='扫码录入']/div/input"
# 获取表格条码文本框2
insert_order_barcodes_one = By.XPATH, "//div[@class='ant-modal-content']/div[2]/div/div/form/div[2]/div/div[2]/div[2]/div/div/div/div[4]/span/div/span/div"
# 获取表格条码文本框2
insert_order_barcodes_two = By.XPATH, "//div[@class='ant-modal-content']/div[2]/div/div/form/div[2]/div/div[2]/div[2]/div/div/div[2]/div[4]/span/div/span/div"
# 插入行按钮
insert_order_line = By.XPATH, "//div[@class='ant-modal-content']/div[2]/div/div/form/div[2]/div/div/div[2]/div/button"
# 条码为空文本
insert_order_barcodes_null = By.XPATH, "//div[@class='ant-tooltip-content']/div[text()='条码不能为空']"
# 保存按钮
insert_order_save = By.XPATH, "//div[@class='ant-modal-footer']/button[3]/span[text()='保 存']"
# 关闭按钮
insert_order_close = By.XPATH, "//div[@class='ant-modal-content']/button"

# 编辑按钮
update_order = By.CSS_SELECTOR, ".ant-table-tbody>tr>td:nth-child(2)>span>a:nth-child(3)"
# 编辑客户表格文本
update_order_customer = By.CSS_SELECTOR, ".ant-table-tbody>tr>td:nth-child(3)"

# 批量操作
# 复选框
batch_checkbox = By.XPATH, "//tbody[@class='ant-table-tbody']/tr[1]/td[1]/span/label/span"
# 批量操作悬浮
batch_operation = By.XPATH, "//div[@class='ant-card-body']/div[2]/button[2]/span[text()='批量操作']"
# 反审核
batch_operation_opposite_audit = By.XPATH, "//ul[@role='menu']/li[3][text()='反审核']"
# 审核
batch_operation_audit = By.XPATH, "//ul[@role='menu']/li[2][text()='审核']"
# 获取表格订单状态
batch_operation_state = By.XPATH, "//tbody[@class='ant-table-tbody']/tr[1]/td[14]/span"
# 审核确定按钮
batch_operation_audit_sure = By.XPATH, "//div[@class='ant-modal-body']/div/div[2]/button[2]"

# 查看
# 查看按钮
view_order_bnt = By.CSS_SELECTOR, ".ant-table-tbody>tr:nth-child(1)>td:nth-child(2)>span>a:nth-child(1)"
# 查看编号
view_order_in_id = By.XPATH, "//section[@id='saleOutPrint']/div[1]/div[3]/div/div[2]/div/span"
# 关闭查看页面
view_order_colse = By.XPATH, "//div[@class='ant-modal-root' and not(contains(@id,'XSDD'))]/div[2]/div/div[2]/button"

# 复制按钮
copy_order_bnt = By.CSS_SELECTOR, ".ant-table-tbody>tr>td:nth-child(2)>span>a:nth-child(5)"

# 删除按钮
# 删除按钮
delete_order_one = By.CSS_SELECTOR, ".ant-table-tbody>tr>td:nth-child(2)>span>a:nth-child(7)"
# 批量删除
delete_beach = By.XPATH, "//ul[@role='menu']/li[1][text()='删除']"
# 单击确定
delete_order_sure_bnt = By.XPATH, "//div[@class='ant-popover ant-popover-placement-top' and not(contains(@style,'display'))]//span[contains(text(),'确')]"
# 获取弹出框
delete_order_txt = By.CSS_SELECTOR, ".ant-message-notice-content>div>span"
